package com.ahaoyou.compnent;

import com.ahaoyou.utils.TableOperate;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;

@NoArgsConstructor
@AllArgsConstructor
@Data
public class TableHandlerType {

    private String table;

    private TableOperate operate;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        TableHandlerType that = (TableHandlerType) o;
        return table.equals(that.table) && operate == that.operate;
    }

    @Override
    public int hashCode() {
        return Objects.hash(table, operate);
    }
}